<template>
  <div>
    dasdasdas
    <h1>哈哈哈</h1>
    <van-field label="输入"></van-field>
    {{ form.name }}--{{ age }}
    <van-button @click="dian">点击</van-button>

  </div>
</template>

<script>
import {ref, reactive, onMounted} from 'vue'
import axios from '../http/axios'


export default {
  name: "index",
  setup() {
    let form = reactive({'name': 'ztl', 'age': 20})
    let age = ref(18)
    const dian = () => {
      form.name = 'zyl'
      age.value = 999

      axios('/test?id=' + 1, 'get').then(res => {
        console.log(res)

      })

    }
    onMounted(() => {
      // dian()
    })

    return {
      form,
      age,
      dian
    }
  }


}
</script>

<style scoped>

</style>